<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>卖家认证</title>
   
   <link rel="stylesheet" href="../common/css/bootstrap-datetimepicker.min.css" />
</head>


<body>
	
	   
			<!--头部-->
			
    	<span id="header"></span>
		
	    <div class="auth-main clearfix">
	    	
	    	<span id="nav"></span>
	    	
	        <!--内容区域-->
	        <div  class="main" class="clearfix">
	            <div class="x-ibox-title m-b-sm">
	                <span>卖家认证</span> <a href="javascript:void(0);" onclick="addBrandAuth()" class="btn x-vbtn-danger pull-right" style="margin-top:7px">添加授权品牌</a>
	            </div>
	           
	           <div id="obj1">
	            	
	            
	            <div class="ibox-content x-ibox-content m-b-sm" style="position: relative;"> 
	            	

	                <div class="form-horizontal">
	                   <div class="form-group">
	                   		<label class="col-sm-2 control-label col-width-2">授权品牌:</label>
	                   		<div class="col-sm-6">
								<select class="form-control col-select">
									<option>请选择</option>
								</select>
	                 		</div>
	                 		<a href="javascript:void(0);" onclick="removeBrand(this)"><i class="iconfont icon-shanchu active3" style="position:absolute;right:20px;"></i></a>
	                   </div>
    
	                    <div class="form-group">
	                        <label class="col-sm-2 control-label col-width-2">分类:</label>
	                        <div class="col-sm-6" style="padding-top:7px">
	                        	<label class="checkbox-inline m-input" style="padding-left:0">
		                            	<i class="iconfont icon-duoxuanhuise"></i><input type="checkbox" class="active3" checked="" /><span class="icon-place">控制器</span>
		                        </label>
		                         
		                        <label class="checkbox-inline m-input">
		                            	<i class="iconfont icon-duoxuanhuise"></i><input type="checkbox" class="active3" checked="" /><span class="icon-place">变频器</span>
		                        </label>
		                        
		                        
		                        <label class="checkbox-inline m-input">
		                            	<i class="iconfont icon-duoxuanhuise"></i><input type="checkbox" class="active3" checked="" /><span class="icon-place">视觉系统</span>
		                        </label>
		                        
	                        </div>
	                    </div>
                
	                    <div class="form-group">
	                        <label class="col-sm-2 control-label col-width-2">授权级别:</label>
	                        
	                        <div class="col-sm-6">
	                        	<label class="radio-inline  m-input" style="padding-left:0;margin-left:-2px"> 
		                            	<i class="iconfont icon-danxuanhuise"></i><input type="radio" name="optionsRadio" class="active3" checked="" /><span class="icon-place">品牌商</span>
		                        </label>
	                        	<label class="radio-inline m-input">
		                            	<i class="iconfont icon-danxuanhuise"></i><input type="radio" name="optionsRadio" class="active3" checked="" /><span class="icon-place">一级代理</span>
		                        </label>
		                        
		                        <label class="radio-inline m-input">
		                            	<i class="iconfont icon-danxuanhuise"></i><input type="radio" name="optionsRadio" class="active3" checked="" /><span class="icon-place">二级以下代理</span>
		                        </label>
		                        
	                        </div>
	                    
	                    </div>

						
						 <div class="form-group">
	                   		<label class="col-sm-2 control-label col-width-2">授权有效期:</label>
	                   		<div class="col-sm-8 form-inline">
	                   			
								<input type="text"   class="form-control form_datetime m-r-sm" name="addtime" value="2017-08-08"  readonly style="background-color: #ffffff;"/>-<input type="text"   class="form-control form_datetime m-l-sm"  value="2017-06-15" readonly style="background-color: #ffffff;"/>
	                 		</div>
	                   </div>
    
						
	                    
	                    <div class="form-group">
	                        <label class="col-sm-2 control-label col-width-2" style="padding-top:0">品牌授权证书:</label>
	                        
	                        <div class="col-sm-6 x" style="word-spacing:-6px;">
								<div  class='upload-box m-r-sm ' style="display: none;">
								    <input  type="file" class="fileInput" name="file" value onchange="addUploadBox(this)">
								    <div class="row"></div>
								     
								     <div class="col"></div>
								</div>
								
								
								
								<div  class='upload-box m-r-sm'>
								    <input  type="file" class="fileInput" name="file" value onchange='addUploadBox(this)'>
								    <div class="row"></div>
								     
								     <div class="col"></div>
								</div>
	                           <p class="m-t-sm fs-sm color-md">请上传大小不超过5M的jpeg,png,gif图片</p>
	                        </div>           
	                    
	                    </div>   
	                
	                
	                	
	                	<div class="form-group">
	                		
	                		<label class="col-sm-2 control-label col-width-2"></label>
	                   		
	                		<div class="col-sm-2">
	                			<a href="javascript:void(0);" class="btn x-btn-danger ">提交审核</a>
	                		</div>
	                		
	                	</div>
	                
	                
	                
	                </div>
	                
	                
	             </div>
	             
	             
	           </div>
	           
	           	
	         
	         
	        </div>
	    </div>
	  </body>
</html>

<script src="../common/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../common/js/bootstrap.min.js" ></script>
<script type="text/javascript" src="../common/js/bootstrap-datetimepicker.js" ></script>
<script type="text/javascript" src="../common/js/bootstrap-datetimepicker.zh-CN.js" ></script>
<script type="text/javascript">
	
	$.get('../common/html/head.html',function(data){
		$('title').after(data);
	});
    $.get('../common/html/header.html', function (data) { $('#header').html(data) });

	$.get('../common/html/nav.html', function (data) { $('#nav').html(data) });

    $.get('../common/html/footer.html', function (data) { $('#footer').html(data) });
    
    	$('.checkbox-inline').on('click',function(){
		var inputState =  $(this).find('input[type=checkbox]').prop('checked');
		if(inputState){
				$(this).find('i').addClass('icon-duoxuanhuise').removeClass('icon-duoxuan');	
		}else{		
			$(this).find('i').addClass('icon-duoxuan').removeClass('icon-duoxuanhuise');
		
		}	
			
	});
    
    
    	$('.radio-inline').on('click',function(){
    		
		var inputState =  $(this).find('input[type=radio]').prop('checked');
		if(inputState){
				$(this).find('i').addClass('icon-danxuanhongse').removeClass('icon-danxuanhhuise');
				$(this).siblings().find('i').addClass('icon-danxuanhhuise').removeClass('icon-danxuanhongse');
		}
			
	});
	



	   //日期插件		
		$('.form_datetime').datetimepicker({  
            language: 'zh-CN', 
            minView:'month',
            weekStart: 1,  
            todayBtn:  1,  
            autoclose: 1,  
            todayHighlight: 1,  
            startView: 2,  
            forceParse: 0,  
            showMeridian: 1  
        }).on('changeDate', $(this),function (ev) {  
            $(this).datetimepicker('hide');         
        }); 
	
	

	
//	增加授权品牌
	function addBrandAuth(obj){
    	var obj = $("#obj1").find("div:first").clone(true);
    
    	$("#obj1").append(obj);
    	
	
    	$('#obj1').find('div:first').siblings().find('i').removeClass('active3');
    	
    }
   
  
   //删除授权品牌	
   function removeBrand(obj){
   	$(obj).parent().parent().parent().remove();
   }
   
   
   //文件上传
   function addUploadBox(obj){
   
   		var fileName = $('.upload-box').eq(1).find('input').prop('value');
   		if(fileName.length>0){	
   			var  boxHtml  = $('.upload-box').eq(0).html();
   			$('.upload-box').eq(0).after('<div class="upload-box m-r-sm">'+boxHtml+'</div>');
   			
   			
   			var str = obj.value;
	   		str = str.substring(str.lastIndexOf('\\')+1,str.lastIndexOf('.'));
	   		var str= '<p  style="position:absolute;">'+str+'</p>';
	   		$(obj).parent().append(str).find('div').remove();	
   		}
   		
   }
</script> 	
 	